<?php 

include '../function.php';

// $str = "www.baidu.com";

// $preg = "/(ba)i(du)/";

// echo preg_replace($preg, '\1xxx\2', $str);


// preg_match_all(pattern, subject, matches)


// $tmep =[];

// $content = file_get_contents('http://www.lagou.com/jobs/1916358.html');


// $preg = "/<h1 title=\"(.+)\">/";


// preg_match_all($preg , $content, $ouput);

// $tmep['title'] =$ouput[1][0];

// $preg = "/<span class=\"red\">(.+)<\/span>/";


// preg_match_all($preg , $content, $ouput);

// $tmep['gongzhi'] =$ouput[1][0];


// $preg = "/<span>(.+)<\/span>/";

// preg_match_all($preg , $content, $ouput);

// // $tmep['gongzhi'] =$ouput[1][0];
// $tmep['addr'] =$ouput[1][0];
// $tmep['exp'] =$ouput[1][1];
// $tmep['xueli'] =$ouput[1][2];
// $tmep['jobs'] =$ouput[1][3];


// var_dump($tmep);



// $str = "http://www.baidu.sdfsdf.com";


// $preg = "/^(http|https):\/\/[0-9a-z-]+(\.[0-9a-z-]+)+$/i";



// $preg = "/^(http|https):\/\/[0-9a-z-]+(\.[0-9a-z-])+/i";

// echo preg_match($preg, $str);


 $str = "44528120161131187X";


$preg = "/^[1-8][0-9]{5}(1[0-9]|2[0])[0-9]{2}(0[1-9]|1[0-2])(0[1-9]|1[0-9]|2[0-9]|3[0-1])[0-9]{3}[0-9X]$/";

// $preg = "/^[1-8][0-9]{5}(1[0-9]|2[0])[0-9](0[1-9]|1[0-2])(0[1-9]|1[0-9]|2[0-9]|3[0-1])[0-9]{3}[0-9X]$/";


echo preg_match($preg,  $str);




























 ?>